<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>7_文本溢出替换为省略号</title>
    <style>
        div{
            background-color: yellow;
            width: 500px;
            /*以下三句组合实现文字溢出替换为省略号*/
            white-space: nowrap;
            overflow: hidden;/*多余部分截掉*/
            text-overflow: ellipsis;/*溢出部分替换为省略号*/
        }
    </style>
</head>
<body>
<div>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium debitis dolorem facilis fuga fugit hic in ipsum laboriosam laborum magnam molestias nesciunt, numquam obcaecati quasi quod sed sequi sunt voluptate!
</div>
</body>
</html>